import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;



public class Tracker {
	private final ConcurrentHashMap<String, Point> map = new ConcurrentHashMap<String, Point>();
	//private final HashMap<String, Point> mapHelp = Collections.unmodifiableMap(map);
	//private final HashMap<String, Point> map = new HashMap<String, Point>();
	private final Map<String, Point> mapHelp = Collections.unmodifiableMap(map);
	public Point getLocation(String id) {
		Point point = new Point(map.get(id));
		return point;
	}
	public void setLocation(String id, double x, double y) {
		Point point = new Point(x, y);
		map.put(id, point);
	}
	public Map<String, Point> getLocations() {
			/*HashMap<String, Point> mapHelp = new HashMap<String, Point>();
			Iterator iter = map.entrySet().iterator();
			int i = 0;
			while (iter.hasNext()) {
				i++;
				Map.Entry<String, Point> pairs = (Map.Entry<String, Point>)iter.next();
				mapHelp.put((String)pairs.getKey(), (Point)pairs.getValue());
			}
			return mapHelp;*/
		//Map mapHelp = Collections.unmodifiableMap(map);
		return mapHelp;
	}
}
